home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
comm
/
yep16.zip
/
YEPU.ZIP
/
YEPUSTAT.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1996-02-17
|
2KB
|
68 lines
/* YEPuSTAT - Report number of unique/dupe URLs and info from Yep URL Log
- please edit the line below to reflect the path/filename of your Log,
or specify filename on command line. I.E. YEPuSTAT url.log
*/
UrlLog = 'c:\osu\yarn\url.log'
/* leave these alone */
BetweenRecords = 1;
RecordLines = 0
UrlNum = 0
URLS. = ''
Records = 0
FirstDate = ''
LastDate = ''
Parse arg ln
if (ln \= '') then UrlLog = ln
ret = stream(UrlLog,'c','open read')
if ret <> 'READY:' then do
say 'Can not open URL Log "'UrlLog'" to read.'
exit
end
do while lines(UrlLog)<>0
ln = linein(UrlLog)
if (ln \= '') & (BetweenRecords = 1) then do
BetweenRecords = 0;
RecordLines = 0
Duplicate = 0
Records = Records + 1
end
if (ln \= '') & (BetweenRecords = 0) & (duplicate = 0) then do
RecordLines = RecordLines + 1
Arecord.RecordLines = ln
if SubStr(ln,1,4) == 'URL:' then do
do x = 1 to UrlNum
if URLS.x = ln then Duplicate = 1
end
if Duplicate = 0 then do
UrlNum = UrlNum + 1
URLS.UrlNum = ln
end
end
if SubStr(ln,1,5) = 'Date:' then do
if UrlNum = 1 then FirstDate = SubStr(ln,7,length(ln)-6)
LastDate = SubStr(ln,7,length(ln)-6)
end
end
if (ln == '') & (BetweenRecords = 0) then do
betweenRecords = 1;
end
end
ret = stream(UrlLog,'c','close')
say 'There are 'Records' URLs in "'UrlLog'",'
say 'Of which 'UrlNum' are unique, and 'Records-UrlNum' are duplicates.'
say 'First message date: 'Firstdate
say 'Last message date: 'Lastdate